package debugging;

/**
 * A class which can be set to log (or not log) certain text-output
 * @author Etienne Bruines
 * @author Bas Dobbelsteen
 */
public class Logger 
{
	/**
	 * Creates a new logger which can log to the console
	 * @param a Whether or not to log
	 */
	public Logger(boolean a)
	{
		active = a;
	}
	
	private boolean active;
	
	public void log(String s)
	{
		if (active)
			System.out.print(s);
	}
	
	public void logLine(String s)
	{
		if (active)
			System.out.println(s);
	}
	
	public boolean getActive()
	{
		return active;
	}
	public void setActive(boolean a)
	{
		active = a;
	}
}
